package com.ww.user.controller;

import com.ww.common.dtos.ResponseResult;
import com.ww.model.user.dto.LoginDto;
import com.ww.user.service.ApUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/login")
@Api(value = "App用户登录",tags = "userLogin",description = "App用户登录")
public class LoginController {
    @Autowired
    private ApUserService apUserService;
    @PostMapping("login_auth")
    @ApiOperation("登录方法")
    public ResponseResult login(@RequestBody LoginDto dto){
        ResponseResult loginResult= apUserService.login(dto);
        return loginResult;
    }
}
